<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //  1.声明试
      function 函数名字() {}
      function f1() {
        console.log(555);
      }
    //   2.函数表达式方式
    //var 函数名字=function(){}
      var f2 = function () {
        console.log(888);
      };
      f1();
      f2();
    </script>
  </body>
</html>
